package org.dawfinn.droiditarian.deedfavoriteupload;

import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;

import org.dawfinn.droiditarian.data.Deed;

import android.util.Log;

public class LocalDeedFavoriteUpload implements DeedFavoriteUpload {

	private final String path;
	
	public LocalDeedFavoriteUpload(String path) {
		this.path = path;
	}

	public void sendDeedFavorite(Deed deed, boolean complete) {
		try {
			URL url = new URL(path + "?id=" 
					+ URLEncoder.encode(deed.getServerId(), "UTF-8"));

			Log.v("Local Favorite", url.toString());
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
	}
}
